<template>
  <div id="app">
    <Navbar v-show="show_nav"/>
    <b-container fluid>
      <b-alert v-model="show_message" variant="warning" dismissible>{{ alert_message }}</b-alert>
      <!--    路由视图-->
      <router-view/>
    </b-container>
  </div>
</template>

<script>
import Navbar from "@/components/Navbar";

export default {
  name: 'App',
  data() {
    return {
      show_nav: true
    };
  },
  components: {
    Navbar
  },
  computed: {
    show_message: function () {
      return this.alert_message !== undefined;
    },
    alert_message: function () {
      return this.$route.query.alert_message;
    }
  }
}
</script>

<!--<style>-->
<!--#app {-->
<!--  font-family: Avenir, Helvetica, Arial, sans-serif;-->
<!--  -webkit-font-smoothing: antialiased;-->
<!--  -moz-osx-font-smoothing: grayscale;-->
<!--  text-align: center;-->
<!--  color: #2c3e50;-->
<!--  margin-top: 60px;-->
<!--}-->
<!--</style>-->
